//
//  RDMergeRequestManager.h
//  RDelivery
//
//  Created by mellow on 2023/4/3.
//  Copyright © 2023 Tencent. All rights reserved.
//

#import "RDHttpSession.h"

NS_ASSUME_NONNULL_BEGIN

typedef void (^RDHttpResponseBlock)(NSData * _Nullable responseObject, NSInteger httpStatusCode, NSError * _Nullable error);

@interface RDBatchRequestManager: NSObject

+ (instancetype)sharedInstance;

- (void)updateSettings:(RDeliverySDKSettings *)settings;

- (void)registerReqIds:(NSArray<NSString *> *)reqIds
               reqTime:(NSTimeInterval)reqTime;

- (NSUInteger)unregisterReqId:(NSString *)reqId
                      reqTime:(NSString *)reqTime;

- (void)unregisterAllReqId:(NSString *)reqId;

- (void)sendBatchRequest:(RDHttpRequest *)request
               requestId:(NSString *)requestId
              completion:(RDHttpResponseBlock)completion;

@end

NS_ASSUME_NONNULL_END
